package com.sgb.kjwl.model.entity.transport;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

/**
 * 单项列表页面数据类
 */
public class SingleItemEntity implements MultiItemEntity, Parcelable {
    private int itemType;
    private int leftIcon;
    private String leftString;
    private String rightString;
    private String bottomString;
    private int rightColor;
    private boolean isShowArrow = true;
    private boolean showBadge;//是否展示标签
    private int number;//标签数量
    private int maxNumber;//最大标签数量

    public SingleItemEntity() {
    }

    public SingleItemEntity(int itemType) {
        this.itemType = itemType;
    }

    public SingleItemEntity(String leftString, String rightString) {
        this.leftString = leftString;
        this.rightString = rightString;
    }

    public SingleItemEntity(int itemType, int leftIcon, String leftString) {
        this.itemType = itemType;
        this.leftIcon = leftIcon;
        this.leftString = leftString;
    }

    public SingleItemEntity(int leftIcon, String leftString) {
        this.leftIcon = leftIcon;
        this.leftString = leftString;
    }

    public SingleItemEntity(int itemType, int leftIcon, String leftString, String rightString) {
        this.itemType = itemType;
        this.leftIcon = leftIcon;
        this.leftString = leftString;
        this.rightString = rightString;
    }


    public SingleItemEntity(int itemType, String leftString, String rightString) {
        this.itemType = itemType;
        this.leftString = leftString;
        this.rightString = rightString;
    }

    public SingleItemEntity(int itemType, String leftString, String rightString, String bottomString) {
        this.itemType = itemType;
        this.leftString = leftString;
        this.rightString = rightString;
        this.bottomString = bottomString;
    }

    public SingleItemEntity(int itemType, String leftString, String rightString, int rightColor) {
        this.itemType = itemType;
        this.leftString = leftString;
        this.rightString = rightString;
        this.rightColor = rightColor;
    }

    public SingleItemEntity(String leftString, String rightString, int rightColor) {
        this.leftString = leftString;
        this.rightString = rightString;
        this.rightColor = rightColor;
    }

    public SingleItemEntity(int itemType, String leftString, String rightString, int rightColor, boolean showBadge) {
        this.itemType = itemType;
        this.leftString = leftString;
        this.rightString = rightString;
        this.rightColor = rightColor;
        this.showBadge = showBadge;
    }

    public SingleItemEntity(String leftString, String rightString, int rightColor, boolean showBadge) {
        this.leftString = leftString;
        this.rightString = rightString;
        this.rightColor = rightColor;
        this.showBadge = showBadge;
    }

    public SingleItemEntity(int itemType, int leftIcon, String leftString, boolean showBadge, int maxNumber) {
        this.itemType = itemType;
        this.leftIcon = leftIcon;
        this.leftString = leftString;
        this.showBadge = showBadge;
        this.maxNumber = maxNumber;
    }

    public SingleItemEntity(int leftIcon, String leftString, boolean showBadge, int maxNumber) {
        this.leftIcon = leftIcon;
        this.leftString = leftString;
        this.showBadge = showBadge;
        this.maxNumber = maxNumber;
    }

    protected SingleItemEntity(Parcel in) {
        itemType = in.readInt();
        leftIcon = in.readInt();
        leftString = in.readString();
        rightString = in.readString();
        bottomString = in.readString();
        rightColor = in.readInt();
        isShowArrow = in.readByte() != 0;
        showBadge = in.readByte() != 0;
        number = in.readInt();
        maxNumber = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(itemType);
        dest.writeInt(leftIcon);
        dest.writeString(leftString);
        dest.writeString(rightString);
        dest.writeString(bottomString);
        dest.writeInt(rightColor);
        dest.writeByte((byte) (isShowArrow ? 1 : 0));
        dest.writeByte((byte) (showBadge ? 1 : 0));
        dest.writeInt(number);
        dest.writeInt(maxNumber);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<SingleItemEntity> CREATOR = new Creator<SingleItemEntity>() {
        @Override
        public SingleItemEntity createFromParcel(Parcel in) {
            return new SingleItemEntity(in);
        }

        @Override
        public SingleItemEntity[] newArray(int size) {
            return new SingleItemEntity[size];
        }
    };

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public int getLeftIcon() {
        return leftIcon;
    }

    public void setLeftIcon(int leftIcon) {
        this.leftIcon = leftIcon;
    }

    public String getLeftString() {
        return leftString;
    }

    public void setLeftString(String leftString) {
        this.leftString = leftString;
    }

    public String getRightString() {
        return rightString;
    }

    public void setRightString(String rightString) {
        this.rightString = rightString;
    }

    public int getRightColor() {
        return rightColor;
    }

    public void setRightColor(int rightColor) {
        this.rightColor = rightColor;
    }

    public boolean isShowArrow() {
        return isShowArrow;
    }

    public void setShowArrow(boolean showArrow) {
        isShowArrow = showArrow;
    }

    public boolean isShowBadge() {
        return showBadge;
    }

    public void setShowBadge(boolean showBadge) {
        this.showBadge = showBadge;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getMaxNumber() {
        return maxNumber;
    }

    public void setMaxNumber(int maxNumber) {
        this.maxNumber = maxNumber;
    }

    public String getBottomString() {
        return bottomString;
    }

    public void setBottomString(String bottomString) {
        this.bottomString = bottomString;
    }

    @Override
    public int getItemType() {
        return itemType;
    }
}
